s = 5
for x in [1, 3, 2]:
    print('1st', x)
    if x > 2:
        for z in range(2): print('2nd')
        print('bla')
        for i in range(x):
            a = i
            print('3rd', i)
    print('back to 1st')
print('end')
